<div id="subPage" data-type="select" class="tpl-portlet-components" style="min-height:300px;">
  <div id="subList" >
    <div class="portlet-title">
      <div class="caption font-green bold">
        <span >我的选题</span>
      </div>
    </div>
    <div class="tpl-block">
      <div class="am-g">
        <div class="am-u-sm-12">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
                <th>序号</th>
                <th>题目</th>
                <!-- <th>志愿</th> -->
                <th>状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody id="data-list">

            </tbody>
          </table>
          <hr>
        </div>
      </div>
    </div>
  </div>
  <div id="subInfo" style="display:none;" >
    <p style="text-align:center;font-size:36px;margin-top:7%;color:#aaa;">您还没有选题</p>
  </div>
</div>

<div  class="tpl-portlet-components">
    <div class="tpl-left-nav tpl-left-nav-hover">
      <div class="tpl-left-nav-title">
        老师
      </div>
      <div class="tpl-left-nav-list">
        <ul class="tpl-left-nav-menu" id="teacherList">

        </ul>
      </div>
    </div>
    <div class="tpl-content-wrapper" >
      <table class="am-table am-table-striped am-table-hover table-main">
        <thead>
          <tr>
            <th>题目</th>
            <th>面向专业</th>
            <th>已选人数</th>
            <th>是否确选</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody id="sub-list">

        </tbody>
      </table>
    </div>

</div>
<script id="teacSelectListTpl" type="text/html">
  <% for(var i=0;i<$data.length;i++){ %>
  <li class="tpl-left-nav-item ">
    <a href="javascript:;" class="nav-link <%if(i==0) print('active')%> teacItem" onclick="toggleTeac(<%==i%>,'<%==$data[i].id%>')" >
          <%==$data[i].nickname%>
      </a>
  </li>
    <%}%>

</script>
<script id="stuSubListTpl" type="text/html">
  <% for(var i=0;i<$data.length;i++){ %>
    <% if(i%2==0){%>
      <tr list-data-id="<%==$data[i].id%>">
        <td><%==i+1%></td>
        <td style="<% if($data[i].status==-1) print('color:#ccc;')%>"><%==$data[i].title%></td>
        <%if($data[i].status==1){%>
        <td style="color:red;">确选</td>
        <%}else if($data[i].status==0){%>
          <td style="color:green;">等待</td>
        <%}else if($data[i].status==-1){%>
          <td style="color:#ccc;">落选</td>
          <%}%>
        <td>
          <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
              <button onclick="go('paper/detail.html?id=<%==$data[i].subjectId%>')" class="am-btn am-btn-default am-btn-xs "><span class="am-icon-pencil-square-o"></span>选题详细</button>
              <%if($data[i].status==0){%>
              <button onclick="quitSelect('<%==$data[i].subjectId%>')"   class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-trash-o"></span>退选</button>
              <%}%>
          </div>
          </div>
        </td>
      </tr>
      <%}else if(i%2==1){%>
        <tr list-data-id="<%==$data[i].id%>">
          <td><%==i+1%></td>
          <td style="<% if($data[i].status==-1) print('color:#ccc;')%>"><%==$data[i].title%></td>
          <%if($data[i].status==1){%>
          <td style="color:red;">确选</td>
          <%}else if($data[i].status==0){%>
            <td style="color:green;">等待</td>
          <%}else if($data[i].status==-1){%>
            <td style="color:#ccc;">落选</td>
            <%}%>
          <td>
            <div class="am-btn-toolbar">
              <div class="am-btn-group am-btn-group-xs">
                <button onclick="go('paper/detail.html?id=<%==$data[i].subjectId%>')" class="am-btn am-btn-default am-btn-xs "><span class="am-icon-pencil-square-o"></span>选题详细</button>
                <%if($data[i].status==0){%>
                <button onclick="quitSelect('<%==$data[i].subjectId%>')"   class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-trash-o"></span>退选</button>
                <%}%>
              </div>
            </div>
          </td>
        </tr>
        <%}}%>
</script>
<script id="subListTpl" type="text/html">
  <% for(var i=0;i<$data.length;i++){ %>
    <% if(i%2==0){%>
      <tr list-data-id="<%==$data[i].id%>">
        <td><%==$data[i].title%></td>
        <td><%==$data[i].majorName%></td>
        <td><%==$data[i].guysNum%></td>
        <%if($data[i].choose==1){%>
         <td style="color:green;">是</td>
         <%}else{%>
        <td style="color:red;">否</td>
         <%}%>%>
        <td>
          <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
              <button onclick="go('paper/detail?id=<%==$data[i].id%>')" class="am-btn am-btn-default am-btn-xs "><span class="am-icon-pencil-square-o"></span>选题详细</button>
              <button onclick="selectSubject('<%==$data[i].id%>')"    class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-secondary"><span class="am-icon-trash-o"></span>选择</button>
            </div>
          </div>
        </td>
      </tr>
      <%}else if(i%2==1){%>
        <tr list-data-id="<%==$data[i].id%>">
          <td><%==$data[i].title%></td>
          <td><%==$data[i].majorName%></td>
          <td><%==$data[i].guysNum%></td>
          <%if($data[i].choose==1){%>
           <td style="color:green;">是</td>
           <%}else{%>
          <td style="color:red;">否</td>
           <%}%>%>
          <td>
            <div class="am-btn-toolbar">
              <div class="am-btn-group am-btn-group-xs">
                <button onclick="go('paper/detail?id=<%==$data[i].id%>')" class="am-btn am-btn-default am-btn-xs "><span class="am-icon-pencil-square-o"></span>选题详细</button>
                <button onclick="selectSubject('<%==$data[i].id%>')"  class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-secondary"><span class="am-icon-trash-o"></span>选择</button>
              </div>
            </div>
          </td>
        </tr>
        <%}}%>
</script>
<!-- <script src="static/js/amazeui.min.js"></script> -->
